
<div class="layui-input-inline">
    <a class="layui-btn" href="{:url('Member/addmember')}">添加用户</a>
</div>

<table class="layui-table" lay-filter="edit-table" lay-data="{method: 'post',loading:'true', url:'{:url('Member/member')}', page:true, id:'idDemo'}" lay-filter="test">
    <thead>
    <tr>
        <th lay-data="{field:'company_name'}">单位</th>
        <th lay-data="{field:'department_name'}">部门</th>
        <th lay-data="{field:'member_name'}">姓名</th>
        <th lay-data="{toolbar:'#member_sex'}">性别</th>
        <th lay-data="{field:'member_tel'}">电话</th>
        <th lay-data="{toolbar:'#member_isvip'}">是否vip</th>
        <th lay-data="{toolbar:'#info',width:180,}">操作</th>
    </tr>
    </thead>
</table>
<script type="text/html" id="member_sex">
    {{#  if(d.member_sex == 1){ }}
    男
    {{#  } else if(d.member_sex == 2) { }}
    女
    {{#  } }}
</script>
<script type="text/html" id="member_isvip">
    {{#  if(d.member_isvip == 1){ }}
    是
    {{#  } else if(d.member_isvip == 2){ }}
    否
    {{#  } }}
</script>
<script type="text/html" id="info">
    {{#  if(d.member_isvip == 1){ }}
    <a class="layui-btn layui-btn-danger layui-btn-xs" href="{:url('Member/lookaboutcar')}?member_id={{d.member_id}}">约车记录</a>
    {{#  } else if(d.member_isvip == 2) { }}
    <a class="layui-btn layui-btn-normal layui-btn-xs  edit-table ajax-delete delete" data-title="设为vip" data-msg="确定要将此用户设为vip？" href="{:url('Member/setupvip')}?member_id={{d.member_id}}">设为vip</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" href="{:url('Member/lookaboutcar')}?member_id={{d.member_id}}">约车记录</a>
    {{#  } }}
</script>

